<!DOCTYPE html>
<html lang="en">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>个人中心-消息中心</title>
	<link href="#" rel="shortcut icon">
	<script type="text/javascript" src="js/jquery-1.10.1.min.js"></script>
	<script src="js/md5.js"></script>
	<script src="js/layer.js"></script>
	<script type="text/javascript" src="js/public.js"></script>
	<link type="text/css" rel="stylesheet" href="css/layout.css">
	<link rel="stylesheet" type="text/css" href="css/bifa.css">

</head>

<body>
	<iframe src="./header.html" id="header" width="100%" height="185" frameborder="0" scrolling="no" ></iframe>		
	<div class="standing">
		<div class="stand-w w clearfix">
			<div class="stand-left">
				<div class="user-person">
					<div class="user-mess">
						<div class="mess-pic"><img /></div>
						<div class="mess-name">
							<p>账户名：<span id="user-name"></span></p>
							<p>余额：<span id="user-total"></span></p>
						</div>
					</div>
					<div class="tw-btn">
						<span class="recharge-btn">充值</span>
						<span class="withdraw-btn">提现</span>
					</div>
				</div>
				<ul class="stand-ul">
					<li>
						<a href="lottery.html">
							<div class="stand-list">
								<img src="images/lottery.png" >
								<span>中奖历史</span>
							</div>
						</a>
					</li>
					<li >
						<a href="standings.html">
							<div class="stand-list">
								<img src="images/standings.png" >
								<span>战绩</span>
							</div>
						</a>
					</li>
					<li >
						<a href="detail.html">
							<div class="stand-list">
								<img src="images/detail.png" >
								<span>账户明细</span>
							</div>
						</a>
					</li>
					<li>
						<a href="transaction.html">
							<div class="stand-list">
								<img src="images/transaction.png" >
								<span>交易记录</span>
							</div>
						</a>
					</li>
					<li >
						<a href="personal.html">
							<div class="stand-list">
								<img src="images/personal.png" >
								<span>个人资料</span>
							</div>
						</a>
					</li>
					<li>
						<a id="server">
							<div class="stand-list">
								<img src="images/server.png" >
								<span>客服</span>
							</div>
						</a>
					</li>
					<li class="hover">
						<a href="information.html">
							<div class="stand-list">
								<img src="images/information.png" >
								<span>消息中心</span>
							</div>
						</a>
					</li>
				</ul>
			</div>
			<div class="stand-right">
				<div class="person-top">
					<h3>消息中心</h3>
				</div>
				<div class="info-body">
					<ul class="info-list">
						
					</ul>
				</div>
			</div>
		</div>
	</div>
	

	<iframe src="./footer.html" width="100%" height="80" frameborder="0" scrolling="no" ></iframe>	


	<script>
		// 个人资料
		$(function(){

			var uid = getCookie('uid');
			var userObj = jsonObj;//个人信息
			userObj.uid = uid;
			
			//用户信息
			$ajax(
				url+'member_info',
				'post',
				userObj,
				function(data){
					console.log(data)
					if(data.data.avatar){
						$('.mess-pic img,.li-pic img').attr('src',data.data.avatar);//用户头像

					}else{
						$('.mess-pic img,.li-pic img').attr('src','images/user-pic.png');
					}

					$('#user-name').text(data.data.username);
					$('#user-total').text(data.data.balance);
					$('#server').click(function(){
						openQQ(data.data.serviceQQ)
					})


					deposit(data) //提现

				},
				function(data){
					layer.msg(data.msg)
				}
			)
			// 提现提交
			userObj.page = '1';
			userObj.count = '10';
			var res = '';
			$ajax(
				url+'message',
				'post',
				userObj,
				function(data){
					console.log(data)
					var list = data.data;
					for(var i =0,iL=list.length;i<iL;i++){
						res+= '<li>'+
										'<a href="">'+
											'<span class="info-title">'+list[i].title+'</span>'+
											'<span class="info-content">'+list[i].content+'</span>'+
											'<span class="info-time">'+list[i].pubdate+'</span>'+
										'</a>'+
									'</li>'
					}
					$('.info-list').append(res)
				},
				function(data){
					layer.msg(data.msg)
				}

			)
			
			// 充值
			$('.recharge-btn').click(function(){
				window.location.href = './recharge.html'
			})

		})
	</script>
</body>

</html>